/**
 * Auteur : Dominique GUERIN
 * dominiquephDOTguerinATgmailDOT..
 * dominiqueDOTguerinATinseeDOTfr(ance)  
 * Remerciements: � Keith Brown pour ses deux livres sur la s�curit� sous Windows et ses diff�rents articles
 *                 et � Michel Barnett de Microsoft pour ses deux articles 
 *                ".NET Remoting Authentication and Authorization Sample"  et le code qui les accompagne
 *  Le code est utilisable, modifiable et redistribuable � volont� sous la condition de ne pas supprimer ces 7 lignes.
 */ 

package fr.doume.jna.realm;


import java.security.Principal;
import java.security.cert.X509Certificate;

import org.apache.catalina.realm.RealmBase;


//tomcat 5.5
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

//tomcat 6
//import org.apache.juli.logging.Log;
//import org.apache.juli.logging.LogFactory;

/**
 * Inherits from the class <code>RealmBase</code> .
 * A realm must be defined and we cannot use the abstract class <code>RealmBase</code>   
 */

public class WindowsRealm extends RealmBase 
{

    private static Log log = LogFactory.getLog(WindowsRealm.class);

    /**
     * Name of the realm used in the logs.
     */
    protected static final String info =
        "fr.doume.realm.WindowsRealm/1.0";

    /**
     * Returns "WindowsRealm"
     */
    protected String getName()
    {
      return "WindowsRealm";
    }

    /**
     * Returns null. Nver called.
     */
    protected String getPassword(String username)
    {
      return null;
    }

    /**
     * Returns null. Nver called.
     */
    protected Principal getPrincipal(X509Certificate usercert) 
    {
        return null;
    } 

    /**
     * Returns null. Nver called.
     */
    protected Principal getPrincipal(String username)
    {
      return null;
    }
    
}
